Integrand size = 35, antiderivative size = 171 \[ \int \frac {(a+a \sin (e+f x))^2 (A+B \sin (e+f x))}{c+d \sin (e+f x)} \, dx=-\frac {a^2 \left (2 A (c-2 d) d-B \left (2 c^2-4 c d+3 d^2\right )\right ) x}{2 d^3}-\frac {2 a^2 (c-d)^2 (B c-A d) \arctan \left (\frac {d+c \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {c^2-d^2}}\right )}{d^3 \sqrt {c^2-d^2} f}+\frac {a^2 (2 B c-2 A d-3 B d) \cos (e+f x)}{2 d^2 f}-\frac {B \cos (e+f x) \left (a^2+a^2 \sin (e+f x)\right )}{2 d f} \]
-1/2*a^2*(2*A*(c-2*d)*d-B*(2*c^2-4*c*d+3*d^2))*x/d^3+1/2*a^2*(-2*A*d+2*B*c -3*B*d)*cos(f*x+e)/d^2/f-1/2*B*cos(f*x+e)*(a^2+a^2*sin(f*x+e))/d/f-2*a^2*( c-d)^2*(-A*d+B*c)*arctan((d+c*tan(1/2*f*x+1/2*e))/(c^2-d^2)^(1/2))/d^3/f/( c^2-d^2)^(1/2)
Time = 0.45 (sec) , antiderivative size = 177, normalized size of antiderivative = 1.04 \[ \int \frac {(a+a \sin (e+f x))^2 (A+B \sin (e+f x))}{c+d \sin (e+f x)} \, dx=\frac {a^2 (1+\sin (e+f x))^2 \left (2 \left (2 A d (-c+2 d)+B \left (2 c^2-4 c d+3 d^2\right )\right ) (e+f x)-\frac {8 (c-d)^2 (B c-A d) \arctan \left (\frac {d+c \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {c^2-d^2}}\right )}{\sqrt {c^2-d^2}}-4 d (-B c+A d+2 B d) \cos (e+f x)-B d^2 \sin (2 (e+f x))\right )}{4 d^3 f \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )^4} \]
(a^2*(1 + Sin[e + f*x])^2*(2*(2*A*d*(-c + 2*d) + B*(2*c^2 - 4*c*d + 3*d^2) )*(e + f*x) - (8*(c - d)^2*(B*c - A*d)*ArcTan[(d + c*Tan[(e + f*x)/2])/Sqr t[c^2 - d^2]])/Sqrt[c^2 - d^2] - 4*d*(-(B*c) + A*d + 2*B*d)*Cos[e + f*x] - B*d^2*Sin[2*(e + f*x)]))/(4*d^3*f*(Cos[(e + f*x)/2] + Sin[(e + f*x)/2])^4 )
Time = 1.05 (sec) , antiderivative size = 185, normalized size of antiderivative = 1.08, number of steps used = 13, number of rules used = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.343, Rules used = {3042, 3455, 3042, 3447, 3042, 3502, 3042, 3214, 3042, 3139, 1083, 217}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {(a \sin (e+f x)+a)^2 (A+B \sin (e+f x))}{c+d \sin (e+f x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {(a \sin (e+f x)+a)^2 (A+B \sin (e+f x))}{c+d \sin (e+f x)}dx\) |
\(\Big \downarrow \) 3455 |
\(\displaystyle \frac {\int \frac {(\sin (e+f x) a+a) (a (B c+2 A d)-a (2 B c-2 A d-3 B d) \sin (e+f x))}{c+d \sin (e+f x)}dx}{2 d}-\frac {B \cos (e+f x) \left (a^2 \sin (e+f x)+a^2\right )}{2 d f}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {(\sin (e+f x) a+a) (a (B c+2 A d)-a (2 B c-2 A d-3 B d) \sin (e+f x))}{c+d \sin (e+f x)}dx}{2 d}-\frac {B \cos (e+f x) \left (a^2 \sin (e+f x)+a^2\right )}{2 d f}\) |
\(\Big \downarrow \) 3447 |
\(\displaystyle \frac {\int \frac {-\left ((2 B c-2 A d-3 B d) \sin ^2(e+f x) a^2\right )+(B c+2 A d) a^2+\left (a^2 (B c+2 A d)-a^2 (2 B c-2 A d-3 B d)\right ) \sin (e+f x)}{c+d \sin (e+f x)}dx}{2 d}-\frac {B \cos (e+f x) \left (a^2 \sin (e+f x)+a^2\right )}{2 d f}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {-\left ((2 B c-2 A d-3 B d) \sin (e+f x)^2 a^2\right )+(B c+2 A d) a^2+\left (a^2 (B c+2 A d)-a^2 (2 B c-2 A d-3 B d)\right ) \sin (e+f x)}{c+d \sin (e+f x)}dx}{2 d}-\frac {B \cos (e+f x) \left (a^2 \sin (e+f x)+a^2\right )}{2 d f}\) |
\(\Big \downarrow \) 3502 |
\(\displaystyle \frac {\frac {\int \frac {a^2 d (B c+2 A d)-a^2 \left (2 A (c-2 d) d-B \left (2 c^2-4 d c+3 d^2\right )\right ) \sin (e+f x)}{c+d \sin (e+f x)}dx}{d}+\frac {a^2 (-2 A d+2 B c-3 B d) \cos (e+f x)}{d f}}{2 d}-\frac {B \cos (e+f x) \left (a^2 \sin (e+f x)+a^2\right )}{2 d f}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\int \frac {a^2 d (B c+2 A d)-a^2 \left (2 A (c-2 d) d-B \left (2 c^2-4 d c+3 d^2\right )\right ) \sin (e+f x)}{c+d \sin (e+f x)}dx}{d}+\frac {a^2 (-2 A d+2 B c-3 B d) \cos (e+f x)}{d f}}{2 d}-\frac {B \cos (e+f x) \left (a^2 \sin (e+f x)+a^2\right )}{2 d f}\) |
\(\Big \downarrow \) 3214 |
\(\displaystyle \frac {\frac {-\frac {2 a^2 (c-d)^2 (B c-A d) \int \frac {1}{c+d \sin (e+f x)}dx}{d}-\frac {a^2 x \left (2 A d (c-2 d)-B \left (2 c^2-4 c d+3 d^2\right )\right )}{d}}{d}+\frac {a^2 (-2 A d+2 B c-3 B d) \cos (e+f x)}{d f}}{2 d}-\frac {B \cos (e+f x) \left (a^2 \sin (e+f x)+a^2\right )}{2 d f}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {-\frac {2 a^2 (c-d)^2 (B c-A d) \int \frac {1}{c+d \sin (e+f x)}dx}{d}-\frac {a^2 x \left (2 A d (c-2 d)-B \left (2 c^2-4 c d+3 d^2\right )\right )}{d}}{d}+\frac {a^2 (-2 A d+2 B c-3 B d) \cos (e+f x)}{d f}}{2 d}-\frac {B \cos (e+f x) \left (a^2 \sin (e+f x)+a^2\right )}{2 d f}\) |
\(\Big \downarrow \) 3139 |
\(\displaystyle \frac {\frac {-\frac {4 a^2 (c-d)^2 (B c-A d) \int \frac {1}{c \tan ^2\left (\frac {1}{2} (e+f x)\right )+2 d \tan \left (\frac {1}{2} (e+f x)\right )+c}d\tan \left (\frac {1}{2} (e+f x)\right )}{d f}-\frac {a^2 x \left (2 A d (c-2 d)-B \left (2 c^2-4 c d+3 d^2\right )\right )}{d}}{d}+\frac {a^2 (-2 A d+2 B c-3 B d) \cos (e+f x)}{d f}}{2 d}-\frac {B \cos (e+f x) \left (a^2 \sin (e+f x)+a^2\right )}{2 d f}\) |
\(\Big \downarrow \) 1083 |
\(\displaystyle \frac {\frac {\frac {8 a^2 (c-d)^2 (B c-A d) \int \frac {1}{-\left (2 d+2 c \tan \left (\frac {1}{2} (e+f x)\right )\right )^2-4 \left (c^2-d^2\right )}d\left (2 d+2 c \tan \left (\frac {1}{2} (e+f x)\right )\right )}{d f}-\frac {a^2 x \left (2 A d (c-2 d)-B \left (2 c^2-4 c d+3 d^2\right )\right )}{d}}{d}+\frac {a^2 (-2 A d+2 B c-3 B d) \cos (e+f x)}{d f}}{2 d}-\frac {B \cos (e+f x) \left (a^2 \sin (e+f x)+a^2\right )}{2 d f}\) |
\(\Big \downarrow \) 217 |
\(\displaystyle \frac {\frac {-\frac {4 a^2 (c-d)^2 (B c-A d) \arctan \left (\frac {2 c \tan \left (\frac {1}{2} (e+f x)\right )+2 d}{2 \sqrt {c^2-d^2}}\right )}{d f \sqrt {c^2-d^2}}-\frac {a^2 x \left (2 A d (c-2 d)-B \left (2 c^2-4 c d+3 d^2\right )\right )}{d}}{d}+\frac {a^2 (-2 A d+2 B c-3 B d) \cos (e+f x)}{d f}}{2 d}-\frac {B \cos (e+f x) \left (a^2 \sin (e+f x)+a^2\right )}{2 d f}\) |
((-((a^2*(2*A*(c - 2*d)*d - B*(2*c^2 - 4*c*d + 3*d^2))*x)/d) - (4*a^2*(c - d)^2*(B*c - A*d)*ArcTan[(2*d + 2*c*Tan[(e + f*x)/2])/(2*Sqrt[c^2 - d^2])] )/(d*Sqrt[c^2 - d^2]*f))/d + (a^2*(2*B*c - 2*A*d - 3*B*d)*Cos[e + f*x])/(d *f))/(2*d) - (B*Cos[e + f*x]*(a^2 + a^2*Sin[e + f*x]))/(2*d*f)
3.3.55.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[-b, 2])^( -1))*ArcTan[Rt[-b, 2]*(x/Rt[-a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] & & (LtQ[a, 0] || LtQ[b, 0])
Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Simp[-2 Subst[I nt[1/Simp[b^2 - 4*a*c - x^2, x], x], x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x]
Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{e = Fre eFactors[Tan[(c + d*x)/2], x]}, Simp[2*(e/d) Subst[Int[1/(a + 2*b*e*x + a *e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}, x] && NeQ [a^2 - b^2, 0]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])/((c_.) + (d_.)*sin[(e_.) + (f_. )*(x_)]), x_Symbol] :> Simp[b*(x/d), x] - Simp[(b*c - a*d)/d Int[1/(c + d *Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Int[(a + b*Sin[e + f*x])^m*(A*c + (B*c + A*d)*Sin[e + f*x] + B*d*Sin[e + f*x]^2), x] /; FreeQ[{a, b, c, d, e, f, A, B, m}, x] && NeQ[b*c - a*d, 0]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Sim p[(-b)*B*Cos[e + f*x]*(a + b*Sin[e + f*x])^(m - 1)*((c + d*Sin[e + f*x])^(n + 1)/(d*f*(m + n + 1))), x] + Simp[1/(d*(m + n + 1)) Int[(a + b*Sin[e + f*x])^(m - 1)*(c + d*Sin[e + f*x])^n*Simp[a*A*d*(m + n + 1) + B*(a*c*(m - 1 ) + b*d*(n + 1)) + (A*b*d*(m + n + 1) - B*(b*c*m - a*d*(2*m + n)))*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, n}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && GtQ[m, 1/2] && !LtQ[n, -1 ] && IntegerQ[2*m] && (IntegerQ[2*n] || EqQ[c, 0])
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(-C)*Co s[e + f*x]*((a + b*Sin[e + f*x])^(m + 1)/(b*f*(m + 2))), x] + Simp[1/(b*(m + 2)) Int[(a + b*Sin[e + f*x])^m*Simp[A*b*(m + 2) + b*C*(m + 1) + (b*B*(m + 2) - a*C)*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, B, C, m}, x] && !LtQ[m, -1]
Time = 0.74 (sec) , antiderivative size = 235, normalized size of antiderivative = 1.37
method | result | size |
derivativedivides | \(\frac {2 a^{2} \left (-\frac {\frac {-\frac {B \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right ) d^{2}}{2}+\left (A \,d^{2}-c d B +2 d^{2} B \right ) \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )+\frac {B \tan \left (\frac {f x}{2}+\frac {e}{2}\right ) d^{2}}{2}+A \,d^{2}-c d B +2 d^{2} B}{\left (1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )^{2}}+\frac {\left (2 A c d -4 A \,d^{2}-2 B \,c^{2}+4 c d B -3 d^{2} B \right ) \arctan \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2}}{d^{3}}+\frac {\left (c^{2} d A -2 d^{2} c A +A \,d^{3}-B \,c^{3}+2 c^{2} d B -d^{2} c B \right ) \arctan \left (\frac {2 c \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+2 d}{2 \sqrt {c^{2}-d^{2}}}\right )}{d^{3} \sqrt {c^{2}-d^{2}}}\right )}{f}\) | \(235\) |
default | \(\frac {2 a^{2} \left (-\frac {\frac {-\frac {B \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right ) d^{2}}{2}+\left (A \,d^{2}-c d B +2 d^{2} B \right ) \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )+\frac {B \tan \left (\frac {f x}{2}+\frac {e}{2}\right ) d^{2}}{2}+A \,d^{2}-c d B +2 d^{2} B}{\left (1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )^{2}}+\frac {\left (2 A c d -4 A \,d^{2}-2 B \,c^{2}+4 c d B -3 d^{2} B \right ) \arctan \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2}}{d^{3}}+\frac {\left (c^{2} d A -2 d^{2} c A +A \,d^{3}-B \,c^{3}+2 c^{2} d B -d^{2} c B \right ) \arctan \left (\frac {2 c \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+2 d}{2 \sqrt {c^{2}-d^{2}}}\right )}{d^{3} \sqrt {c^{2}-d^{2}}}\right )}{f}\) | \(235\) |
risch | \(-\frac {x \,a^{2} A c}{d^{2}}+\frac {2 x \,a^{2} A}{d}+\frac {x \,a^{2} B \,c^{2}}{d^{3}}-\frac {2 x \,a^{2} c B}{d^{2}}+\frac {3 x \,a^{2} B}{2 d}-\frac {a^{2} {\mathrm e}^{i \left (f x +e \right )} A}{2 d f}+\frac {a^{2} {\mathrm e}^{i \left (f x +e \right )} B c}{2 d^{2} f}-\frac {a^{2} {\mathrm e}^{i \left (f x +e \right )} B}{d f}-\frac {a^{2} {\mathrm e}^{-i \left (f x +e \right )} A}{2 d f}+\frac {a^{2} {\mathrm e}^{-i \left (f x +e \right )} B c}{2 d^{2} f}-\frac {a^{2} {\mathrm e}^{-i \left (f x +e \right )} B}{d f}+\frac {\sqrt {-\left (c -d \right ) \left (c +d \right )}\, a^{2} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+\frac {i c +\sqrt {-\left (c -d \right ) \left (c +d \right )}}{d}\right ) A c}{\left (c +d \right ) f \,d^{2}}-\frac {\sqrt {-\left (c -d \right ) \left (c +d \right )}\, a^{2} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+\frac {i c +\sqrt {-\left (c -d \right ) \left (c +d \right )}}{d}\right ) A}{\left (c +d \right ) f d}-\frac {\sqrt {-\left (c -d \right ) \left (c +d \right )}\, a^{2} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+\frac {i c +\sqrt {-\left (c -d \right ) \left (c +d \right )}}{d}\right ) B \,c^{2}}{\left (c +d \right ) f \,d^{3}}+\frac {\sqrt {-\left (c -d \right ) \left (c +d \right )}\, a^{2} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+\frac {i c +\sqrt {-\left (c -d \right ) \left (c +d \right )}}{d}\right ) c B}{\left (c +d \right ) f \,d^{2}}-\frac {\sqrt {-\left (c -d \right ) \left (c +d \right )}\, a^{2} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+\frac {i c -\sqrt {-\left (c -d \right ) \left (c +d \right )}}{d}\right ) A c}{\left (c +d \right ) f \,d^{2}}+\frac {\sqrt {-\left (c -d \right ) \left (c +d \right )}\, a^{2} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+\frac {i c -\sqrt {-\left (c -d \right ) \left (c +d \right )}}{d}\right ) A}{\left (c +d \right ) f d}+\frac {\sqrt {-\left (c -d \right ) \left (c +d \right )}\, a^{2} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+\frac {i c -\sqrt {-\left (c -d \right ) \left (c +d \right )}}{d}\right ) B \,c^{2}}{\left (c +d \right ) f \,d^{3}}-\frac {\sqrt {-\left (c -d \right ) \left (c +d \right )}\, a^{2} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+\frac {i c -\sqrt {-\left (c -d \right ) \left (c +d \right )}}{d}\right ) c B}{\left (c +d \right ) f \,d^{2}}-\frac {B \,a^{2} \sin \left (2 f x +2 e \right )}{4 f d}\) | \(707\) |
2/f*a^2*(-1/d^3*((-1/2*B*tan(1/2*f*x+1/2*e)^3*d^2+(A*d^2-B*c*d+2*B*d^2)*ta n(1/2*f*x+1/2*e)^2+1/2*B*tan(1/2*f*x+1/2*e)*d^2+A*d^2-c*d*B+2*d^2*B)/(1+ta n(1/2*f*x+1/2*e)^2)^2+1/2*(2*A*c*d-4*A*d^2-2*B*c^2+4*B*c*d-3*B*d^2)*arctan (tan(1/2*f*x+1/2*e)))+(A*c^2*d-2*A*c*d^2+A*d^3-B*c^3+2*B*c^2*d-B*c*d^2)/d^ 3/(c^2-d^2)^(1/2)*arctan(1/2*(2*c*tan(1/2*f*x+1/2*e)+2*d)/(c^2-d^2)^(1/2)) )
Time = 0.29 (sec) , antiderivative size = 452, normalized size of antiderivative = 2.64 \[ \int \frac {(a+a \sin (e+f x))^2 (A+B \sin (e+f x))}{c+d \sin (e+f x)} \, dx=\left [-\frac {B a^{2} d^{2} \cos \left (f x + e\right ) \sin \left (f x + e\right ) - {\left (2 \, B a^{2} c^{2} - 2 \, {\left (A + 2 \, B\right )} a^{2} c d + {\left (4 \, A + 3 \, B\right )} a^{2} d^{2}\right )} f x + {\left (B a^{2} c^{2} - {\left (A + B\right )} a^{2} c d + A a^{2} d^{2}\right )} \sqrt {-\frac {c - d}{c + d}} \log \left (-\frac {{\left (2 \, c^{2} - d^{2}\right )} \cos \left (f x + e\right )^{2} - 2 \, c d \sin \left (f x + e\right ) - c^{2} - d^{2} - 2 \, {\left ({\left (c^{2} + c d\right )} \cos \left (f x + e\right ) \sin \left (f x + e\right ) + {\left (c d + d^{2}\right )} \cos \left (f x + e\right )\right )} \sqrt {-\frac {c - d}{c + d}}}{d^{2} \cos \left (f x + e\right )^{2} - 2 \, c d \sin \left (f x + e\right ) - c^{2} - d^{2}}\right ) - 2 \, {\left (B a^{2} c d - {\left (A + 2 \, B\right )} a^{2} d^{2}\right )} \cos \left (f x + e\right )}{2 \, d^{3} f}, -\frac {B a^{2} d^{2} \cos \left (f x + e\right ) \sin \left (f x + e\right ) - {\left (2 \, B a^{2} c^{2} - 2 \, {\left (A + 2 \, B\right )} a^{2} c d + {\left (4 \, A + 3 \, B\right )} a^{2} d^{2}\right )} f x - 2 \, {\left (B a^{2} c^{2} - {\left (A + B\right )} a^{2} c d + A a^{2} d^{2}\right )} \sqrt {\frac {c - d}{c + d}} \arctan \left (-\frac {{\left (c \sin \left (f x + e\right ) + d\right )} \sqrt {\frac {c - d}{c + d}}}{{\left (c - d\right )} \cos \left (f x + e\right )}\right ) - 2 \, {\left (B a^{2} c d - {\left (A + 2 \, B\right )} a^{2} d^{2}\right )} \cos \left (f x + e\right )}{2 \, d^{3} f}\right ] \]
[-1/2*(B*a^2*d^2*cos(f*x + e)*sin(f*x + e) - (2*B*a^2*c^2 - 2*(A + 2*B)*a^ 2*c*d + (4*A + 3*B)*a^2*d^2)*f*x + (B*a^2*c^2 - (A + B)*a^2*c*d + A*a^2*d^ 2)*sqrt(-(c - d)/(c + d))*log(-((2*c^2 - d^2)*cos(f*x + e)^2 - 2*c*d*sin(f *x + e) - c^2 - d^2 - 2*((c^2 + c*d)*cos(f*x + e)*sin(f*x + e) + (c*d + d^ 2)*cos(f*x + e))*sqrt(-(c - d)/(c + d)))/(d^2*cos(f*x + e)^2 - 2*c*d*sin(f *x + e) - c^2 - d^2)) - 2*(B*a^2*c*d - (A + 2*B)*a^2*d^2)*cos(f*x + e))/(d ^3*f), -1/2*(B*a^2*d^2*cos(f*x + e)*sin(f*x + e) - (2*B*a^2*c^2 - 2*(A + 2 *B)*a^2*c*d + (4*A + 3*B)*a^2*d^2)*f*x - 2*(B*a^2*c^2 - (A + B)*a^2*c*d + A*a^2*d^2)*sqrt((c - d)/(c + d))*arctan(-(c*sin(f*x + e) + d)*sqrt((c - d) /(c + d))/((c - d)*cos(f*x + e))) - 2*(B*a^2*c*d - (A + 2*B)*a^2*d^2)*cos( f*x + e))/(d^3*f)]
Timed out. \[ \int \frac {(a+a \sin (e+f x))^2 (A+B \sin (e+f x))}{c+d \sin (e+f x)} \, dx=\text {Timed out} \]
Exception generated. \[ \int \frac {(a+a \sin (e+f x))^2 (A+B \sin (e+f x))}{c+d \sin (e+f x)} \, dx=\text {Exception raised: ValueError} \]
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(4*d^2-4*c^2>0)', see `assume?` f or more de
Time = 0.29 (sec) , antiderivative size = 305, normalized size of antiderivative = 1.78 \[ \int \frac {(a+a \sin (e+f x))^2 (A+B \sin (e+f x))}{c+d \sin (e+f x)} \, dx=\frac {\frac {{\left (2 \, B a^{2} c^{2} - 2 \, A a^{2} c d - 4 \, B a^{2} c d + 4 \, A a^{2} d^{2} + 3 \, B a^{2} d^{2}\right )} {\left (f x + e\right )}}{d^{3}} - \frac {4 \, {\left (B a^{2} c^{3} - A a^{2} c^{2} d - 2 \, B a^{2} c^{2} d + 2 \, A a^{2} c d^{2} + B a^{2} c d^{2} - A a^{2} d^{3}\right )} {\left (\pi \left \lfloor \frac {f x + e}{2 \, \pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (c\right ) + \arctan \left (\frac {c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + d}{\sqrt {c^{2} - d^{2}}}\right )\right )}}{\sqrt {c^{2} - d^{2}} d^{3}} + \frac {2 \, {\left (B a^{2} d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 2 \, B a^{2} c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 2 \, A a^{2} d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 4 \, B a^{2} d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - B a^{2} d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 2 \, B a^{2} c - 2 \, A a^{2} d - 4 \, B a^{2} d\right )}}{{\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 1\right )}^{2} d^{2}}}{2 \, f} \]
1/2*((2*B*a^2*c^2 - 2*A*a^2*c*d - 4*B*a^2*c*d + 4*A*a^2*d^2 + 3*B*a^2*d^2) *(f*x + e)/d^3 - 4*(B*a^2*c^3 - A*a^2*c^2*d - 2*B*a^2*c^2*d + 2*A*a^2*c*d^ 2 + B*a^2*c*d^2 - A*a^2*d^3)*(pi*floor(1/2*(f*x + e)/pi + 1/2)*sgn(c) + ar ctan((c*tan(1/2*f*x + 1/2*e) + d)/sqrt(c^2 - d^2)))/(sqrt(c^2 - d^2)*d^3) + 2*(B*a^2*d*tan(1/2*f*x + 1/2*e)^3 + 2*B*a^2*c*tan(1/2*f*x + 1/2*e)^2 - 2 *A*a^2*d*tan(1/2*f*x + 1/2*e)^2 - 4*B*a^2*d*tan(1/2*f*x + 1/2*e)^2 - B*a^2 *d*tan(1/2*f*x + 1/2*e) + 2*B*a^2*c - 2*A*a^2*d - 4*B*a^2*d)/((tan(1/2*f*x + 1/2*e)^2 + 1)^2*d^2))/f
Time = 20.39 (sec) , antiderivative size = 7371, normalized size of antiderivative = 43.11 \[ \int \frac {(a+a \sin (e+f x))^2 (A+B \sin (e+f x))}{c+d \sin (e+f x)} \, dx=\text {Too large to display} \]
(atan(((((8*(16*A^2*a^4*c^2*d^6 - 16*A^2*a^4*c^3*d^5 + 4*A^2*a^4*c^4*d^4 + 9*B^2*a^4*c^2*d^6 - 24*B^2*a^4*c^3*d^5 + 28*B^2*a^4*c^4*d^4 - 16*B^2*a^4* c^5*d^3 + 4*B^2*a^4*c^6*d^2 + 24*A*B*a^4*c^2*d^6 - 44*A*B*a^4*c^3*d^5 + 32 *A*B*a^4*c^4*d^4 - 8*A*B*a^4*c^5*d^3))/d^5 + ((((32*c^2*d^3 + (8*tan(e/2 + (f*x)/2)*(12*c*d^10 - 8*c^3*d^8))/d^6)*(B*a^2*c^2*1i + (a^2*d^2*(4*A + 3* B)*1i)/2 - (a^2*d*(2*A*c + 4*B*c)*1i)/2))/d^3 - (8*(8*A*a^2*c*d^8 + 6*B*a^ 2*c*d^8 - 8*A*a^2*c^2*d^7 - 8*B*a^2*c^2*d^7 + 2*B*a^2*c^3*d^6))/d^5 + (8*t an(e/2 + (f*x)/2)*(8*A*a^2*c*d^9 - 16*A*a^2*c^2*d^8 + 8*A*a^2*c^3*d^7 - 8* B*a^2*c^2*d^8 + 16*B*a^2*c^3*d^7 - 8*B*a^2*c^4*d^6))/d^6)*(B*a^2*c^2*1i + (a^2*d^2*(4*A + 3*B)*1i)/2 - (a^2*d*(2*A*c + 4*B*c)*1i)/2))/d^3 + (8*tan(e /2 + (f*x)/2)*(32*A^2*a^4*c^4*d^5 - 32*A^2*a^4*c^3*d^6 - 16*A^2*a^4*c^2*d^ 7 - 8*A^2*a^4*c^5*d^4 - 48*B^2*a^4*c^2*d^7 + 43*B^2*a^4*c^3*d^6 + 8*B^2*a^ 4*c^4*d^5 - 44*B^2*a^4*c^5*d^4 + 32*B^2*a^4*c^6*d^3 - 8*B^2*a^4*c^7*d^2 + 28*A^2*a^4*c*d^8 + 18*B^2*a^4*c*d^8 - 80*A*B*a^4*c^2*d^7 + 8*A*B*a^4*c^3*d ^6 + 76*A*B*a^4*c^4*d^5 - 64*A*B*a^4*c^5*d^4 + 16*A*B*a^4*c^6*d^3 + 48*A*B *a^4*c*d^8))/d^6)*(B*a^2*c^2*1i + (a^2*d^2*(4*A + 3*B)*1i)/2 - (a^2*d*(2*A *c + 4*B*c)*1i)/2)*1i)/d^3 + (((8*(16*A^2*a^4*c^2*d^6 - 16*A^2*a^4*c^3*d^5 + 4*A^2*a^4*c^4*d^4 + 9*B^2*a^4*c^2*d^6 - 24*B^2*a^4*c^3*d^5 + 28*B^2*a^4 *c^4*d^4 - 16*B^2*a^4*c^5*d^3 + 4*B^2*a^4*c^6*d^2 + 24*A*B*a^4*c^2*d^6 - 4 4*A*B*a^4*c^3*d^5 + 32*A*B*a^4*c^4*d^4 - 8*A*B*a^4*c^5*d^3))/d^5 + (((8...